package lambda_expression.jdk;

import java.util.UUID;
import java.util.function.UnaryOperator;

/**
 * UnaryOperator
 * 接收一个参数对象T，返回结果对象T
 */
public class UnaryOperatorTest {
    public static void main(String[] args) {
        UnaryOperator<String> unaryOperator = (String name) -> {
            return UUID.randomUUID().toString() + "--"+ name;
        };

        System.out.println(unaryOperator.apply("刘备"));
    }
}
